home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Win2k Control Panel 2.xpl < prev    next >
Text File  |  1999-09-03  |  2KB  |  96 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "TEXT 1"="Edit Path..."
  5. "TEXT 2"="Delete"
  6. "UIPATH"="Appearance\Control Panel\Windows 2000 Icons"
  7. "NAME"="Visible Items (System)"
  8. "VERSION"="0.90"
  9. "LANGUAGE"="VBScript"
  10. "DESCRIPTION 1"=""
  11. "DESCRIPTION 2"=""
  12. "DESCRIPTION 3"=""
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  16.  
  17.  
  18. 'COPY! DO NOT EDIT! COPY! DO NOT EDIT! COPY! DO NOT EDIT! COPY! DO NOT EDIT!
  19. 'COPY! DO NOT EDIT! COPY! DO NOT EDIT! COPY! DO NOT EDIT! COPY! DO NOT EDIT! 
  20.  
  21. 'sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Control Panel\cpls\"
  22. sP="HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\cpls\"
  23.  
  24. Sub Plugin_Initialize 
  25.  if GetWinVer=4 then
  26.    iCount=RegEnumValues(sP)
  27.  
  28.    for l=1 to iCount
  29.      s=sP & RegEnumElement(l) 
  30.      s2=RegReadValue(s)
  31.      s3=RegEnumElement(l) & " (" & s2 & ")"
  32.  
  33.      Call SetUIElement(l,s3)
  34.    next
  35.  else
  36.   Disable
  37.  end if
  38. End Sub
  39.  
  40. Sub Plugin_CheckData(ElementIndex)
  41. End Sub
  42.  
  43. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  44.  if ElementSubIndex>0 then 'OK, user has selected an item
  45.  
  46.     If ElementIndex=1 then 
  47.        'Rename file
  48.  
  49.        s=sP & RegEnumElement(ElementSubIndex)
  50.        sV=RegReadValue(s) 
  51.  
  52.        sV=InputWindow("Change path",sV,1)
  53.  
  54.        if IsEmpty(sV)=false then
  55.           'change it (write REG_EXPAND_SZ)
  56.           Call RegWriteValue(s,sV,4)
  57.           
  58.           'update UI
  59.           s=RegEnumElement(ElementSubIndex) & " (" & sV & ")"
  60.           Call SetUIElement(ElementSubIndex,s)
  61.        end if 
  62.  
  63.     else 
  64.        'Delete!!
  65.  
  66.        s=""
  67.        sV=InputWindow("Enter YES to delete this item",s,1)
  68.        
  69.        bOK=false 
  70.        if IsEmpty(sV)=false then
  71.           if sV="YES" then
  72.              bOK=true
  73.              s=sP & RegEnumElement(ElementSubIndex)
  74.              Call RegDeleteValue(s) 
  75.              Call SetUIElement(ElementSubIndex,"")
  76.           end if 
  77.        end if
  78.  
  79.        if bOK=false then
  80.           Call MsgWarning("Items was not deleted") 
  81.        end if
  82.        
  83.     end if
  84.  
  85.  
  86.  else
  87.   Call MsgWarning("No item selected - please select an item first.")
  88.  end if
  89. End Sub
  90.  
  91. Sub Plugin_Terminate 
  92. End Sub
  93.  
  94.  
  95.  
  96.